package me.snowiest.snowdrift.controller;

import me.snowiest.snowdrift.constant.ArchiveConstant;
import me.snowiest.snowdrift.entity.Archive;
import me.snowiest.snowdrift.vo.CommonResult;
import me.snowiest.snowdrift.service.ArchiveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.*;

@CrossOrigin
@RestController
@RequestMapping("/archive")
public class ArchiveController {
    @Autowired
    private ArchiveService archiveService;

    @GetMapping
    public CommonResult getArchive(
            @RequestParam(value = "id", required = false) Integer id,
            @RequestParam(value = "pages", required = false) Integer pages,
            @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize
    ) {
        return null;
    }

    @GetMapping("/{id}")
    public CommonResult getArchive(@PathVariable("id") Integer id) {
        return null;
    }

    @PostMapping
    public CommonResult addArchive(@RequestBody Archive archive) {
        return null;
    }

    @PutMapping
    public CommonResult saveArchive(@RequestBody Archive archive) {
        return null;
    }

    @PutMapping("/{id}")
    public CommonResult saveArchive(@RequestBody Archive archive, @PathVariable("id") Integer id) {
        return null;
    }

    @DeleteMapping
    public CommonResult removeArchive1(@RequestParam("id") Integer id) {
        return null;
    }

    @DeleteMapping("/{id}")
    public CommonResult removeArchive2(@PathVariable("id") Integer id) {
        return null;
    }
}
